﻿using Common.Communication;
using Common.Device.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Device.Interfaces
{
    public interface IWanYongBiao:IDevice
    {
        /// <summary>
        /// 采集电压
        /// </summary>
        /// <param name="channel">通道</param>
        /// <param name="mode">电压模式</param>
        /// <returns></returns>
        Result<double> GetVoltage(int channel=1, CeLiangYiEnum.VoltageMode mode = CeLiangYiEnum.VoltageMode.DC);
        /// <summary>
        /// 采集电流
        /// </summary>
        /// <param name="channel">通道</param>
        /// <param name="mode">电流模式</param>
        /// <returns></returns>
        Result<double> GetCurrent(int channel = 1, CeLiangYiEnum.CurrentMode mode = CeLiangYiEnum.CurrentMode.DC);
        /// <summary>
        /// 采集电阻
        /// </summary>
        /// <param name="channel">通道</param>
        /// <param name="mode">电阻模式</param>
        /// <returns></returns>
        Result<double> GetResistance(int channel = 1, CeLiangYiEnum.ResistanceMode mode = CeLiangYiEnum.ResistanceMode._2WR);
        /// <summary>
        /// 通断检测
        /// </summary>
        /// <param name="channel">通道</param>
        /// <returns></returns>
        Result<double> GetContinuity(int channel = 1);
        /// <summary>
        /// 二极管检测
        /// </summary>
        /// <param name="channel">通道</param>
        /// <returns></returns>
        Result<double> GetDiode(int channel = 1);
    }
}
